Skip to content

Dynamic splash image #9827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Dynamic splash image #9827

wants to merge 2 commits into from

Conversation

alranel
Copy link

@alranel alranel commented Mar 2, 2020

This PR allows to display dynamic splash images according to an URL returned by the server polled for version check. Such behavior can be used to inform users about news in the Arduino world.

To trigger this feature, one more line can be added to the https://www.arduino.cc/latest.txt file:

10812
splashImage=https://www.arduino.cc/foo-bar.png

(This does not break version check by current versions of the IDE, as they only read the first line.)

The splashImage URL, if any, is stored in the application preferences and used at the next run (version check is performed after the splash screen disappears).

As of now, no caching mechanism is in place: the remote image is loaded from remote at launch time. Loading is pretty quick, so users see the default image for a bit, and then it gets replaced by the new one.

I also tried to implement a click handler in order to open a URL when user clicks on the splash screen, but it seems that this is not possible with java.awt.SplashScreen and we would need to reimplement the splash screen as a JPanel.

Note: this is just a proof-of-concept. We might want to add signature verification. Do not merge for now :)

Screenshot 2020-03-02 at 18 01 58

@alranel alranel requested a review from cmaglie March 2, 2020 18:11
@matthijskooijman
Copy link
Collaborator

I like the idea, but some reservations:

  • Users might not be amused, or at least be surprised, when the IDE does significant amounts of data transfer on startup (downloading a few bytes for a version number is negligable, but an image file might not be). Personally, I'm not too worried about this, but I think some users might be. This probably needs at least an opt-out setting somewhere.
  • Will this work gracefully on a broken or slow connection? I think your latest commit adds error handling, but it might be good to doublecheck this.

@cmaglie cmaglie self-assigned this Mar 25, 2020
@cmaglie cmaglie added this to the Release 1.8.13 milestone Mar 25, 2020
@cmaglie
Copy link
Member

cmaglie commented Mar 25, 2020

The IDE already does a non-neglibile amount of transfer to check for updates on libraries and plaforms, library_index.json.gz is already 1.2M (and growing).

$ curl http://downloads.arduino.cc/libraries/library_index.json.gz -s |wc
   4364   24364 1200885

@cmaglie
Copy link
Member

cmaglie commented Mar 27, 2020

Follow up on #9935

@cmaglie cmaglie closed this Mar 27, 2020
@alranel alranel deleted the splash-image branch May 19, 2020 13:38
@per1234 per1234 added Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic labels Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants